<div class="al-modal-view">
  <div>
    <div class="al-modal-title">{{modalTitle}}</div>
    <div class="al-modal-form-container">
      <ng-form name="modalForm" class="form-horizontal form-validation" role="form">
        <div class="form-group">
          <label class="col-sm-3 control-label">默认字段</label>
          <div class="col-sm-8">
            <div class="param-tag picked" ng-repeat="item in activeBasicParams">
              {{item.paramName}}
            </div>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-3 control-label">主要字段</label>
          <div class="col-sm-8">
            <div class="param-tag" ng-class="{'picked':chkBox.ids[item.paramKey]}"
                 ng-click="chkBox.ids[item.paramKey]=!chkBox.ids[item.paramKey];chkBox.data[item.paramKey]=item"
                 ng-repeat="item in activeOtherParams">
              {{item.paramName}}
            </div>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-3 control-label">自定义字段</label>
          <div class="col-sm-5">
            <div class="control-label main-text-color" ng-click="addCustomParam()"
                 style="text-align: left;">添加
            </div>
          </div>
        </div>
        <div class="form-group" ng-repeat="item in customParamList">
          <div class="col-sm-4">
            <div class="input-group" style="margin-bottom: 5px;">
              <input type="text" class="form-control" ng-model="item.paramName">
              <span class="input-group-btn">
                <button ng-click="removeCustomParam(item)"
                        class="btn btn-default" type="button">移除</button>
              </span>
            </div>
          </div>
          <div class="col-sm-3">
            <select ng-model="item.paramType" class="form-control" ng-change="resetOptions(item)"
                    ng-options="option.value as option.name for option in activeParamTypeList">
            </select>
          </div>
          <div class="col-sm-5">
            <select ng-show="item.paramType==1 && !pickingType[item.paramKey]" ng-model="item.options" class="form-control"
                    ng-options="option.value as option.name for option in activeParamRequiredList">
            </select>
            <input ng-show="item.paramType!=1 && !pickingType[item.paramKey]" class="form-control" ng-model="item.paramValue" type="text">
          </div>
        </div>
        <div class="form-group">
          <div class="col-sm-3"></div>
          <div class="col-sm-3">
            <button class="al-center btn btn-default" ng-click="cancel()">取消</button>
          </div>
          <div class="col-sm-3">
            <button class="al-center btn btn-primary" ng-disabled="modalForm.$invalid" ng-click="confirm()">保存</button>
          </div>
          <div class="col-sm-3"></div>
        </div>
      </ng-form>
    </div>
  </div>
</div>